﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TypeRuleModule.aspx.cs" Inherits="Sdepci.InfoCode.Web.CodeDesign.TypeRuleModule" %>
<%@ Register src="../Includes/VerifyLoginState.ascx" tagname="VerifyLoginState" tagprefix="uc1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>编码规则模型</title>
    <link rel="stylesheet" type="text/css" href="../Css/Style.css" />
    <link rel="stylesheet" type="text/css" href="../Css/Backstage.css" />
    <base target="_self" />
    <script type="text/javascript" src="../Javascript/Common.js"></script>
</head>
<body>
    <form id="form1" runat="server">
    <uc1:VerifyLoginState ID="VerifyLoginState1" runat="server" />
    <div id="container">
        <div style="background-color: #92b7e1; border: solid 1px #92b7e1; height: 15px; padding: 5px 5px 5px 5px; margin: 0px auto 0px auto; color: #ffffff; font-weight: bold;">
            编码规则模型
        </div>
        <div id="editregion">
            <fieldset style="border: solid 1px #92b7e1; height: 105px; padding: 5px 5px 5px 5px; margin: 0px auto 0px auto; text-align: left;">
                <legend>编码表达式</legend>
                <div id="formula" style="font-size: 14px; line-height: 25px; padding: 5px 5px 5px 5px;"></div>
            </fieldset>
            <fieldset id="editmodule" style="border: solid 1px #92b7e1; height: 155px; padding: 5px 5px 5px 5px; margin: 0px auto 0px auto; text-align: left;">
                <legend>增加编码项</legend>
                <div id="region" style="background-color: #efefef; height: 20px; padding: 5px 5px 5px 5px;">
                    <div style="float: left; width: 50%;">
                        <select id="type">
                            <option value="">=编码项类型=</option>
                            <option value="singlecate" style="background-color: #ffcfcf;">单索引字典值</option>
                            <option value="info" style="background-color: #cfffcf;">已有编码数据</option>
                            <option value="infoserial" style="background-color: #efefef;">已有流水号</option>
                            <option value="date" style="background-color: #cfcfff;">年份/月份/日期</option>
                            <option value="text" style="background-color: #cfffff;">普通文本</option>
                            <option value="serial" style="background-color: #ffcfff;">顺序流水号</option>
                            <option value="multicate" style="background-color: #ffffcf;">多索引字典值</option>
                        </select>
                    </div>
                    <div style="float: right; width: 48%; text-align: right;">
                        <input type="radio" id="request1" name="request" value="needed" checked="checked" /><label class="label" for="request1">必填项</label>
                        <input type="radio" id="request2" name="request" value="optional" /><label class="label" for="request2">选填项</label>
                        　<input type="checkbox" id="unserial" value="1" /><label class="label" for="unserial">不影响流水号的生成</label>
                    </div>
                </div>
                <div id="singlecate" style="width: 100%; padding: 5px 0px 0px 0px; display: none; line-height: 25px;">
                    选择索引：<input type="text" class="text" id="singlecate_source" style="width: 200px;" readonly="readonly" onfocus="javascript:this.blur();" />
                    <input type="button" class="button-open" onclick="javascript:OpenCate();" />
                    <input type="checkbox" id="check_limit_length" /><label for="check_limit_length">固定长度</label>
                    <input type="checkbox" id="check_limit_level" title="对于多层树状索引，限定用户只能选择某一层次的索引值" /><label for="check_limit_level" title="对于多层树状索引，限定用户只能选择某一层次的索引值">限定索引层次</label>
                    <input type="text" class="text" id="singlecate_level" style="width: 20px; text-align: center; visibility: hidden;" maxlength="1" /><br />
                    <div id="limit_length" style="display: none;">
                        索引长度：<input type="text" class="text" id="singlecate_length" style="width: 20px; text-align: center;" maxlength="1" />
                        补齐文本：<input type="text" class="text" id="singlecate_supplement" style="width: 20px; text-align: center;" maxlength="1" />
                        <input type="radio" id="singlecate_backward" name="singlecate_position" value="backward" checked="checked" /><label class="label" for="singlecate_backward">后补齐</label>
                        <input type="radio" id="singlecate_forward" name="singlecate_position" value="forward" /><label class="label" for="singlecate_forward">前补齐</label>
                    </div>
                </div>
                <div id="info" style="width: 100%; padding: 5px 0px 0px 0px; display: none; line-height: 25px;">
                    选择编码：<asp:DropDownList ID="info_source" runat="server"></asp:DropDownList>
                </div>
                <div id="infoserial" style="width: 100%; padding: 5px 0px 0px 0px; display: none; line-height: 25px;">
                    选择编码：<asp:DropDownList ID="infoserial_source" runat="server"></asp:DropDownList>
                </div>
                <div id="date" style="width: 100%; padding: 5px 0px 0px 0px; display: none; line-height: 25px;">
                    <input type="radio" id="date_year" name="date_type" value="year" checked="checked" /><label class="label" for="date_year">年份</label>
                    <input type="radio" id="date_month" name="date_type" value="month" /><label class="label" for="date_month">月份</label>
                    <input type="radio" id="date_day" name="date_type" value="day" /><label class="label" for="date_day">日期</label>
                    <div id="year" style="width: 100%; padding: 5px 0px 0px 0px; display: block; line-height: 25px;">
                        说明：年份值为1000~3000之间的四位数字。
                        <input type="checkbox" id="year_current" value="1" /><label class="label" for="year_current">必须当前年份</label>
                    </div>
                    <div id="month" style="width: 100%; padding: 5px 0px 0px 0px; display: none; line-height: 25px;">
                        说明：月份值为01~12之间的两位数字。
                        <input type="checkbox" id="month_current" value="1" /><label class="label" for="month_current">必须当前月份</label>
                    </div>
                    <div id="day" style="width: 100%; padding: 5px 0px 0px 0px; display: none; line-height: 25px;">
                        说明：日期值为01~31之间的两位数字。
                        <input type="checkbox" id="day_current" value="1" /><label class="label" for="day_current">必须当前日期</label>
                    </div>
                </div>
                <div id="text" style="width: 100%; padding: 5px 0px 0px 0px; display: none; line-height: 25px;">
                    <input type="radio" id="text_source1" name="text_source" value="preset" checked="checked" /><label class="label" for="text_source1">预置文本</label>
                    <input type="radio" id="text_source2" name="text_source" value="manual" /><label class="label" for="text_source2">手动输入</label>
                    <span id="span_preset" style="display: block;">预置文本：<input type="text" class="text" id="text_text" style="width: 100px; text-align: center;" maxlength="10" /> 注：空格以下划线“_”代替。</span>
                    <span id="span_manual" style="display: none;">
                        文本长度：<input type="text" class="text" id="text_length" style="width: 20px; text-align: center;" maxlength="1" /> 注：如需表示不定长度，则将该值设为“0”。
                        默认值：<input type="text" class="text" id="text_default" style="width: 40px; text-align: center;" maxlength="10" />（可以留空）
                    </span>
                </div>
                <div id="serial" style="width: 100%; padding: 5px 0px 0px 0px; display: none; line-height: 25px;">
                    编号长度：<input type="text" class="text" id="serial_length" style="width: 20px; text-align: center;" maxlength="1" />
                    注：如需表示不等长流水号，即不编虚位（如“1”不编为“001”），则设为“0”。<br />
                    起始编号：<input type="text" class="text" id="serial_start" style="width: 40px; text-align: center;" maxlength="5" /> 注：此项留空表示从1开始
                    　[<input type="checkbox" id="serial_exist" value="1" /><label class="label" for="serial_exist">显示已有编号列表</label>]
                </div>
                <div id="multicate" style="width: 100%; padding: 5px 0px 0px 0px; display: none; line-height: 25px;">
                    选择索引：<input type="text" class="text" id="multicate_source" style="width: 200px;" readonly="readonly" onfocus="javascript:this.blur();" />
                    <input type="button" class="button-open" onclick="javascript:OpenCate();" />
                    分隔符：<input type="text" class="text" id="multicate_separator" style="width: 20px; text-align: center;" maxlength="1" />（可以留空）
                </div>
                <div id="note_save" style="width: 100%; padding: 5px 0px 0px 0px; display: none; line-height: 25px;">
                    中文说明：<input type="text" class="text" id="note" style="width: 400px;" /><br />
                    <input type="button" value="添加到编码表达式" onclick="javascript:AddRegion();" />
                </div>
            </fieldset>
        </div>
        <div id="buttonregion">
            <input type="button" class="button" value="确定" onclick="javascript:GetModuleXML();" />
            <input type="button" class="button" value="取消" onclick="javascript:self.close();" />
        </div>
        <div id="tipsregion" style="padding: 5px 5px 5px 5px; margin: 5px auto 5px auto;">
            提示：请根据编码规则，顺序添加编码项目，组成编码表达式。<br />
        </div>
    </div>
    <script type="text/javascript" src="../Javascript/RuleModule.js"></script>
    </form>
</body>
</html>
